package com.ruoyi.reception;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.IdWorker;
import com.ruoyi.receipt.service.ALSmsSendService;
import com.ruoyi.receipt.utils.FormulaUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.DataAccessException;
import org.springframework.data.redis.connection.RedisConnection;
import org.springframework.data.redis.core.RedisCallback;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * 用户信息Controller
 * 
 * @author ruoyi
 * @date 2021-03-15
 */
@RestController
@RequestMapping("/reception/test")
public class TestController extends BaseController
{
    @Autowired
    private FormulaUtil formulaUtil;

    @Autowired
    private RedisTemplate redisTemplate;

    @Autowired
    private IdWorker idWorker;

    /**
     * 发送短信注册码
     */
    @PostMapping("/tt")
    public AjaxResult sendVerCode()
    {
        return AjaxResult.success(formulaUtil.time(15));
    }
    @PostMapping("/ttt")
    public AjaxResult sendVerCode1()
    {
        return AjaxResult.success(formulaUtil.capacity(50));
    }
    @PostMapping("/innovate")
    public AjaxResult innovate()
    {
        return AjaxResult.success(formulaUtil.innovate(30));
    }
    //fengrossment
    @PostMapping("/fengrossment")
    public AjaxResult fengrossment()
    {
        return AjaxResult.success(formulaUtil.fengrossment(5,5));
    }
    //synthesize
    @PostMapping("/synthesize")
    public AjaxResult synthesize()
    {
        return AjaxResult.success(formulaUtil.synthesize(15,50,30,5,5));
    }
}
